package com.qwt;

import com.qwt.weather.WeatherAreaConst;
import com.qwt.weather.WeatherInfo;
import com.qwt.weather.WeatherUtil;

public class Test {

    public static void main(String[] args) {
        // 默认获取乐山-市中区天气信息
        WeatherInfo weather = WeatherUtil.getCurrentWeather();

        // 根据区域编码去获取不同城市的天气情况
        WeatherInfo cdWeather = WeatherUtil.getCurrentWeather(WeatherAreaConst.CHENGDU_WUHOU);

        /*
            返回数据实例
            {
                "city": "郫都",
                "temp": "28℃",
                "tempMax": "34℃",
                "tempMin": "20℃",
                "aqi": 42,
                "weather": "多云转晴",
                "weatherCode": "d01",
                "humidity": "41%",
                "pressure": "946hPa",
                "currentWeather": "晴",
                "currentWeatherCode": "d00",
                "alarms": []
            }
         */
    }
}
